<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
          margin:0;
          padding:0;  
        }
        .wrapper{
            width:300px;
            height: 300px;
            border:1px solid black;
        }
        input{
            margin-top:20px;
            width: 100%;
            height: 50px;
            box-sizing: border-box;
            padding:0 10px;
        }
    </style>
</head>
<body>
    <div class="wrapper">
        <!-- Input 标签天生带有border，为 2 px -->
        <input type="text">
    </div>
</body>
</html>